<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        /* .box1 {
            width: 100px;
            height: 100px;
            background: green;
        } */

        /* 伪类选择器可以给其他选择器添加特殊效果，比如鼠标悬浮效果 */
        /* .box1:hover {
            width: 200px;
            height: 200px;
            background: red;
        } */

        div {
            width: 100px;
            height: 100px;
            background: green;
        }

        div:hover {
            width: 200px;
            height: 200px;
            background: yellow;
        }
    </style>
</head>
<body>
    <!-- div.box1 创建一个div，设置class属性为box1 -->
    <div class="box1"></div>
</body>
</html>